@*
 * This template is called from the `index` template. This template
 * handles the rendering of the page header and body tags. It takes
 * three arguments, a `String` for the title of the page and an `Html`
 * object to insert into the body of the page and an `AssetFinder`
 * to define to reverse route static assets.
 *@
@import views.html.dingtalk._
@import security.access.PermissionAccess
@(title: String, styles: Html = Html(""), scripts: Html = Html(""), modals: Html = Html(""))(content: Html)(implicit session:Session)

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@title</title>

    <link rel="stylesheet" href='/static/ionic/core/css/ionic.bundle.css' />
    <style>
    :root {
      --ion-safe-area-top: 20px;
      --ion-safe-area-bottom: 22px;
    }
  </style>

    <link rel="stylesheet" media="screen" href='@routes.Assets.versioned("css/main.css")'>
    <link rel="stylesheet" media="screen" href='/static/layui/css/layui.css'>
    <link rel="shortcut icon" type="image/png" href='@routes.Assets.versioned("images/favicon.png")'>
    <meta name="wpk-bid" content="dta_1_241931328">

<!--    <script defer src='https://g.alicdn.com/code/npm/@@ali/dingtalk-h5-remote-debug/0.1.0/index.js'></script>-->

    @styles
</head>
@if(session.get("accid").isEmpty){<body ng-app="todo" class="layui-layout-body" accesskey="nologin" >}else{<body ng-app="todo" class="layui-layout-body" accesskey='@session.get("sign")'>}
<ion-app>
    <!-- 左侧菜单 -->
    <ion-menu side="start" content-id="main-content">
        <ion-header>
            <ion-toolbar translucent>
                <ion-title>Menu <a href="@routes.UsersController.index()">主页</a></ion-title>
            </ion-toolbar>
        </ion-header>
        <ion-content>
            <ion-list>
                @if(PermissionAccess.check(session.get("admin").getOrElse("0"), "login")){
                <ion-item>
                    <ion-icon name="mail" slot="start"></ion-icon>
                    <ion-label><a href="@routes.UsersController.index()">个人中心</a></ion-label>
                </ion-item>
                @if(PermissionAccess.check(session.get("admin").getOrElse("0"), "wuyang")){
                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@routes.UserNasController.index()">共享服务</a></ion-label>
                </ion-item>
                }
                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@controllers.admin.routes.WiFiController.index()">WiFi服务</a></ion-label>
                </ion-item>

                <ion-item>
                    <ion-icon name="warning" slot="start"></ion-icon>
                    <ion-label><a href="@routes.UsersController.pwdUpdated()">修改密码</a></ion-label>
                </ion-item>
                }
                @if(PermissionAccess.check(session.get("admin").getOrElse("0"), "wuyang")){
                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@controllers.user.routes.KisOutStockController.outstock()">outstock</a></ion-label>
                </ion-item>
                }

                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@controllers.user.routes.KisStockStoreNowController.index()">金蝶库存查询</a></ion-label>
                </ion-item>
                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@controllers.user.routes.ErpMesController.index()">金蝶同步至摩尔MES</a></ion-label>
                </ion-item>
                @if(PermissionAccess.check(session.get("admin").getOrElse("0"), "admin")){
                <ion-item>
                    <ion-icon name="warning" slot="start"></ion-icon>
                    <ion-label><a href="@controllers.admin.routes.AdminController.index()">后台管理</a></ion-label>
                </ion-item>
                }
            </ion-list>
        </ion-content>
    </ion-menu>
    <!-- 中心内容 -->
    <div class="ion-page" id="main-content">
        @content
    </div>
    <!---  header start -->

</ion-app>
<script type="text/javascript" src="@routes.HomeController.javascriptRoutes()"></script>
<script src='/static/layui/layui.js' type="text/javascript"></script>
<script src="//g.alicdn.com/dingding/dingtalk-jsapi/2.0.57/dingtalk.open.js"></script>
<script type="module" src='/static/ionic/core/dist/ionic/ionic.esm.js'></script>
<script nomodule src='/static/ionic/core/dist/ionic/ionic.js'></script>
<script type="module">
    import { modalController } from '/static/ionic/core/dist/ionic/index.esm.js';
    window.modalController = modalController;
  </script>
@scripts
<script>
//JavaScript代码区域

</script>
<script>
@modals
</script>
</body>
</html>



